﻿using UnityEditor;
using UnityEditor.UI;


[CustomEditor(typeof(ToggleEx))]
[CanEditMultipleObjects]
public class ToggleExInspector : ToggleEditor {
    
    private SerializedProperty _children;
    private SerializedProperty _childrenObj;
    void OnEnable()
    {
        base.OnEnable();
        _children = serializedObject.FindProperty("children");
        _childrenObj = serializedObject.FindProperty("childrenObj");
    }
    
    
    public override void OnInspectorGUI() {

        base.OnInspectorGUI();
        serializedObject.Update();
        
        EditorGUILayout.PropertyField( _children );
        EditorGUILayout.PropertyField( _childrenObj );
        
        serializedObject.ApplyModifiedProperties();
    }
}